<?php
/** 
 * $Source: /cvsroot/pn-commerce/pn-commerce/pntemplates/plugins/function.pncCityStateZip.php,v $
 * $Author: pcornelissen $
 * $Revision: 1.4 $
 * $Date: 2003/12/08 12:09:47 $
 *
 * Type: Function
 *
 * return city, state and zip formatted as set in pnModGetVar('AddressFormat')
 *@param params['city'] city name
 *@param params['state'] state name
 *@param params['zip'] the zip
 *@return string formatted according to the setting in 'AddressFormat'
 */
function smarty_function_pncCityStateZip($params, &$smarty)
{
    extract($params);
    $adr = pnModGetVar ('pncommerce', 'AddressFormat');
    $adr = ereg_replace ("%c", $city, $adr);
    $adr = ereg_replace ("%s", $state, $adr);
    $adr = ereg_replace ("%z", $zip, $adr);
    return $adr;
}
?>
